import Vue from 'vue'
import App from './App'

import list from './pages/list/list.vue'
Vue.component('list',list)

import rank from './pages/rank/rank.vue'
Vue.component('rank',rank)

import about from './pages/about/about.vue'
Vue.component('about',about)

Vue.config.productionTip = false

App.mpType = 'app'
Date.prototype.format = function(format) {
   var date = {
          "M+": this.getMonth() + 1,    //月份
          "d+": this.getDate(),            //天
          "h+": this.getHours(),        //小时
          "m+": this.getMinutes(),        //分
          "s+": this.getSeconds(),        //秒
          "q+": Math.floor((this.getMonth() + 3) / 3),    //季度 
          "S+": this.getMilliseconds()    //毫秒 
   };
   if (/(y+)/i.test(format)) {
          format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
   }
   for (var k in date) {
          if (new RegExp("(" + k + ")").test(format)) {
                 format = format.replace(RegExp.$1, RegExp.$1.length == 1
                        ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
          }
   }
   return format;
}
const app = new Vue({
    ...App
})

app.$mount()
